package com.ys.controller.web.sys;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ys.service.sys.SysButtonService;

@Controller
@RequestMapping("/web/sys/sysButton")
public class WebSysButtonController {
	
	@Autowired
	private SysButtonService sysButtonService;

	/*
	 * 新增按钮
	 */
	@GetMapping("/toAddSysButton")
	public String toAddSysButton(Model model, HttpServletRequest request, HttpServletResponse response, 
			Long sysMenuId){
		return sysButtonService.toAddSysButton(model, sysMenuId);
	}

	/*
	 * 编辑按钮
	 */
	@GetMapping("/toEditSysButton")
	public String toEditSysButton(Model model, HttpServletRequest request, HttpServletResponse response, 
			Long id){
		return sysButtonService.toEditSysButton(model, id);
	}
}
